$(function () {
    var obj = document.getElementById("obj").value;
    var reservationsId = document.getElementById("reservationsId").value;
    $.ajax({
        url: Feng.ctxPath + "/appWeb/getPatientContentList",
        type: "post",
        data: {
            "obj": obj,
            "reservationsId": reservationsId
        },
        success: function (data) {
            for (var i = 0; i < data.length; i++) {
                var returnVisitList = '';
                if (data != "") {
                    for (var i = 0; i < data.length; i++) {
                        returnVisitList += ' <div class="patient-box-item" onclick="patient_returnVisit(data[i].reservationsId,obj)"> ' +
                            '                    <div class="patient-box-item-top"> ' +
                            '                        <div class="patient-item-portrait"> ' +
                            '                            <img src="' + Feng.ctxPath + data[i].avatar + '" alt="加载中..."> ' +
                            '                        </div> ' +
                            '                        <div class="patient-item-information"> ' +
                            '                            <div class="patient-item-information-show"> ' +
                            '                                <div><span>' + data[i].customerName + '</span><span>' + data[i].customerAge + '岁 - ' + data[i].sex + '</span></div> ' +
                            '                                <div>' + data[i].customerPhone + '</div> ' +
                            '                            </div> ' +
                            '                            <div class="patient-item-information-operation"> ' +
                            '                                <button type="button" class="btn"><i class="layui-icon layui-icon-rate-solid"></i></button> ' +
                            '                            </div> ' +
                            '                        </div> ' +
                            '                    </div> ' +
                            '                </div>';
                    }
                    $("#returnVisitList").html(returnVisitList);
                }
            }
        }
    })
});

function patient_backHome () {  ////点击返回跳转页面 - 首页
    window.location.href = Feng.ctxPath + "/weixin/index";
}
function patient_addVisit () {  ////点击添加跳转页面 - 新建回访
    window.location.href = Feng.ctxPath + "/appWeb/patient_addVisit";
}